/************************************************************************
 * @file StandardDockPanelManager.h
 * @author Ian Chen
 * @version 1.0
 *
 * @section LICENSE
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 3 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
 * General Public License for more details at
 * http://www.gnu.org/licenses/lgpl.html
 *
 ************************************************************************/
#ifndef STANDARDDOCKPANELMANAGER_H
#define STANDARDDOCKPANELMANAGER_H

#include <QMainWindow>

#include <pluginui/manager/AbstractPanelManager.h>

namespace antu
{
namespace plugin
{
namespace ui
{
class AbstractMenuManager;
class AbstractPanelContainer;

class PLUGINUISHARED_EXPORT StandardDockPanelManager : public QObject, public AbstractPanelManager
{
    Q_OBJECT

public:
    StandardDockPanelManager(AbstractMenuManager* pMenuManager, QMainWindow* pMainWindow);

    virtual void finalize();

protected:
    virtual void createContainer(AbstractPanelContainer* pContainer,
                                 Qt::DockWidgetArea area = Qt::NoDockWidgetArea,
                                 Qt::DockWidgetAreas allowedAreas = Qt::LeftDockWidgetArea |
                                                                    Qt::RightDockWidgetArea |
                                                                    Qt::BottomDockWidgetArea,
                                 QDockWidget::DockWidgetFeatures features = QDockWidget::DockWidgetClosable |
                                                                            QDockWidget::DockWidgetFloatable |
                                                                            QDockWidget::DockWidgetMovable);

protected:
    QMainWindow* m_pMainWindow;
    vector<QDockWidget*> m_oDockWidgets;
    AbstractMenuManager* m_pMenuManager;

private slots:
    void tabPageChanged(QWidget* p);
};

}
}
}


#endif // STANDARDDOCKPANELMANAGER_H
